<cfcomponent name="TestUser" extends="org.cfcunit.framework.TestCase">


	<cffunction name="setUp" access="public" output="false" hint="">
		<cfset var local = StructNew() />
		<cfset local.serviceDefinitionLocation = ExpandPath( '/revenea/testsuite/coldspring.xml' ) />
		<cfset beanFactory = CreateObject('component', 'coldspring.beans.DefaultXmlBeanFactory').init() />
		<cfset beanFactory.loadBeansFromXmlFile(local.serviceDefinitionLocation) />
		<cfset setUser(beanFactory.getBean('User')) />
	</cffunction>

	<cffunction name="test_authenticate" returntype="void" access="public" output="false" hint="">
		<cfset var local = StructNew() />
		<cfset assertTrue(IsBoolean(getUser().authenticate("foo")), "Authenticate did not return a boolean") />
	</cffunction>

	<cffunction name="getUser" access="private" output="false" hint="I return the User.">
		<cfreturn variables.instance.User />
	</cffunction>

	<cffunction name="setUser" access="private" output="false" hint="I set the User.">
		<cfargument name="User" required="true" hint="User" />
		<cfset variables.instance.User = arguments.User />
	</cffunction>


</cfcomponent>